package com.qibo.baselib.widget;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.hjq.toast.ToastUtils;
import com.qibo.baselib.R;

import me.shaohui.bottomdialog.BaseBottomDialog;

@SuppressLint("ValidFragment")
public class PayBottomDialog extends BaseBottomDialog{
    PayBottomDialog dialog;
    Activity activity;
    int type = 0;
    @Override
    public int getLayoutRes() {
        return R.layout.dialog_paydetails;
    }

    public  PayBottomDialog (Activity activity, int type,PayBottomDialog dialog){
        this.activity = activity;
        this.type = type;
        this.dialog = dialog;
    }

    @Override
    public void bindView(View v) {
        TextView dialog_paydetails_tv_amout  = v.findViewById(R.id.dialog_paydetails_tv_amout);
        LinearLayout dialog_paydetails_ll_balance = v.findViewById(R.id.dialog_paydetails_ll_balance);
        LinearLayout dialog_paydetails_ll_wechatorali = v.findViewById(R.id.dialog_paydetails_ll_wechatorali);
        LinearLayout dialog_paydetails_ll_cash = v.findViewById(R.id.dialog_paydetails_ll_cash);
        LinearLayout dialog_paydetails_ll_swipe = v.findViewById(R.id.dialog_paydetails_ll_swipe);
        dialog_paydetails_ll_balance.setOnClickListener(listener);
        dialog_paydetails_ll_wechatorali.setOnClickListener(listener);
        dialog_paydetails_ll_cash.setOnClickListener(listener);
        dialog_paydetails_ll_swipe.setOnClickListener(listener);
    }

    View.OnClickListener listener = new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            int i = view.getId();
            if (i == R.id.dialog_paydetails_ll_balance) {
                ToastUtils.show("余额");
            } else if (i == R.id.dialog_paydetails_ll_wechatorali) {
                ToastUtils.show("微信或支付宝");
            } else if (i == R.id.dialog_paydetails_ll_cash) {
                ToastUtils.show("现金");
            } else if (i == R.id.dialog_paydetails_ll_swipe) {
                ToastUtils.show("刷卡");
            }
        }
    };
}
